## -*- coding: utf-8 -*-

%%inherit(file="./layouts/layout.haml")

@title()
  Editor

%style
  textarea{min-height:300px;}

%form(method="post", action="${action or ''}")
  .row.panel
    -if form:
      -for f in form:
        -if f.type != 'ReferencePropertyField':
          ${f}

    %input(type="submit")

%ul
  -if records:
    -for link in records:
     %li
      %a(href="${link.key().id_or_name()}") ${link.title}
      %a.button.tiny(type="submit",onclick="$.ajax({method:'DELETE', url:'${link.key().id_or_name()}'});")
        Delete

